<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>内容获取与渲染</title>
</head>
<body>
    <div id="root"></div>
    <template>
        <div>box</div>
    </template> 
</body>
<script>
    const tpl = document.querySelector('template');
    const root =  document.querySelector('#root');
    root.appendChild(tpl.content);
</script>
</html>